const DemandModel = require('../../model/demandmodel')
const {
	CodeEnum,
	AreaEnum
} = require("../../enum")
const {
	isString,
	isArray,
	now,
	suc,
	err,
	exc
} = require("../../utils")

module.exports = class IssueLogic {
	static get _model() {
		return new DemandModel()
	}
	
    static get _instance(){
		return IssueLogic._model.getNeatInstance()
	}
	
	// 新增
    async addDemand(v){
		console.log("logic-addDemand");
		// try{
		// 	const { creator:{id,nickname = "",username = "",avatar = ""} = {}, content = ""} = v
		// 	if(!v.id){
		// 		return err("创建者id无效")
		// 	}
		// 	if(!content){
		// 		return err("内容无效")
		// 	}
		// 	const model = IssueLogic._instance;
		// 	model.creator.id = id
		// 	model.creator.nickname = nickname
		// 	model.creator.username = username
		// 	model.creator.avatar = avatar
		// 	model.content = content
		//     const red =  await IssueLogic._model.add(model)  || {}
		// 	suc(red)
		// }catch(e){
		// 	exc(e)
		// }
	}
    
}
